#ifndef CONFIGURATIONPANEL_H
#define CONFIGURATIONPANEL_H

#include "globals.h"
#include "scrollingdialog.h"
#include <wx/panel.h>

class wxButton;
class wxWindow;

class cbConfigurationPanel : public wxPanel {
  public:
    cbConfigurationPanel() : m_parentDialog( 0 ) { ; }
    virtual ~cbConfigurationPanel() {}
    virtual wxString GetTitle() const = 0;
    virtual wxString GetBitmapBaseName() const = 0;
    virtual void OnApply() = 0;
    virtual void OnCancel() = 0;
    void SetParentDialog( wxWindow* dialog ) {
      m_parentDialog = dialog;
    }
    wxWindow* SetParentDialog() { return m_parentDialog; }
    int msging( const wxString& message, const wxString& caption = wxEmptyString, int style = wxOK, wxWindow *parent = NULL, int x = -1, int y = -1 ) {
      if( parent ) {
        return ::msging( message, caption, style, parent, x, y );
      } else
      { return ::msging( message, caption, style, m_parentDialog, x, y ); }
    }
  private:
    wxWindow* m_parentDialog;
};

class cbConfigurationDialog : public wxScrollingDialog {
  public:
    cbConfigurationDialog( wxWindow* parent, int id, const wxString& title );
    void AttachConfigurationPanel( cbConfigurationPanel* panel );
    ~cbConfigurationDialog();
    void EndModal( int retCode );
  protected:
    cbConfigurationPanel* m_pPanel;
    wxButton* m_pOK;
    wxButton* m_pCancel;
  private:

};

#endif
